{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "053fa921",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入城市：广州\n",
      "请输入岗位：产品经理\n",
      " * Serving Flask app '__main__' (lazy loading)\n",
      " * Environment: production\n",
      "\u001b[31m   WARNING: This is a development server. Do not use it in a production deployment.\u001b[0m\n",
      "\u001b[2m   Use a production WSGI server instead.\u001b[0m\n",
      " * Debug mode: off\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\n",
      " * Running on http://127.0.0.1:5000\n",
      "Press CTRL+C to quit\n",
      "[2023-06-24 23:59:29,132] ERROR in app: Exception on / [GET]\n",
      "Traceback (most recent call last):\n",
      "  File \"D:\\adobe\\lib\\site-packages\\requests\\models.py\", line 910, in json\n",
      "    return complexjson.loads(self.text, **kwargs)\n",
      "  File \"D:\\adobe\\lib\\site-packages\\simplejson\\__init__.py\", line 514, in loads\n",
      "    return _default_decoder.decode(s)\n",
      "  File \"D:\\adobe\\lib\\site-packages\\simplejson\\decoder.py\", line 386, in decode\n",
      "    obj, end = self.raw_decode(s)\n",
      "  File \"D:\\adobe\\lib\\site-packages\\simplejson\\decoder.py\", line 416, in raw_decode\n",
      "    return self.scan_once(s, idx=_w(s, idx).end())\n",
      "simplejson.errors.JSONDecodeError: Expecting value: line 1 column 5 (char 4)\n",
      "\n",
      "During handling of the above exception, another exception occurred:\n",
      "\n",
      "Traceback (most recent call last):\n",
      "  File \"D:\\adobe\\lib\\site-packages\\flask\\app.py\", line 2073, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"D:\\adobe\\lib\\site-packages\\flask\\app.py\", line 1518, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"D:\\adobe\\lib\\site-packages\\flask\\app.py\", line 1516, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"D:\\adobe\\lib\\site-packages\\flask\\app.py\", line 1502, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)\n",
      "  File \"C:\\Users\\ZHUANG~1\\AppData\\Local\\Temp/ipykernel_10068/3304641211.py\", line 21, in index\n",
      "    wy.wy_data(area,keys)\n",
      "  File \"D:\\大学学习文件\\大三下\\徐志超\\final\\wy.py\", line 76, in wy_data\n",
      "    response_data = r.json()\n",
      "  File \"D:\\adobe\\lib\\site-packages\\requests\\models.py\", line 917, in json\n",
      "    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)\n",
      "requests.exceptions.JSONDecodeError: [Errno Expecting value]     <!DOCTYPE html>\n",
      "    <html>\n",
      "    <head>\n",
      "        <meta charset=\"UTF-8\">\n",
      "        <title>æ»å¨éªè¯é¡µé¢</title>\n",
      "      <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n",
      "        <style type=\"text/css\">\n",
      "            html, body, div, span, p{\n",
      "                margin:0;\n",
      "                padding:0;\n",
      "                border:0;\n",
      "                outline:0;\n",
      "                font-size:100%;\n",
      "                vertical-align:baseline;\n",
      "                background:transparent;\n",
      "            }\n",
      "            body{\n",
      "                background: #fff;\n",
      "            }\n",
      "        </style>\n",
      "        <script type=\"text/javascript\">\n",
      "            if (window.console === undefined){\n",
      "                console = {};\n",
      "                console.log = function(){};\n",
      "            };\n",
      "\n",
      "            window._waf_is_mobile = false;\n",
      "\n",
      "            (function(a) {\n",
      "                if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))){\n",
      "                    window._waf_is_mobile = true;\n",
      "                }\n",
      "            })(navigator.userAgent || navigator.vendor || window.opera);\n",
      "        </script>\n",
      "        <!-- æµ·å¤é¡µé¢å è½½æ­¤js -->\n",
      "        <!-- <script type=\"text/javascript\" charset=\"utf-8\" src=\"//aeis.alicdn.com/sd/ncpc/nc.js?t=2015052012\"></script>  -->\n",
      "    </head>\n",
      "    <body>\n",
      "        <div id=\"PC\" style=\"display: none\">\n",
      "\n",
      "            <div class=\"contentbg\">\n",
      "                <div class=\"content\">\n",
      "                    <div class=\"left\"></div>\n",
      "                    <div class=\"right\">\n",
      "                        <h1>è®¿é®éªè¯</h1>\n",
      "                        <p>å«ç¦»å¼ï¼ä¸ºäºæ´å¥½çè®¿é®ä½éªï¼è¯·æ»å¨æ»åè¿è¡éªè¯ï¼éè¿åå³å¯ç»§ç»­è®¿é®ç½é¡µ</p>\n",
      "                        <div id=\"nocaptcha\" class=\"nc-container\"></div>\n",
      "                    </div>\n",
      "                </div>\n",
      "            </div>\n",
      "            <div id=\"_umfp\" style=\"display:inline;width:1px;height:1px;overflow:hidden\"></div>\n",
      "        </div>\n",
      "        <div id=\"H5\" style=\"display: none;\">\n",
      "            <div class=\"waf-nc-h5-mask\"></div>\n",
      "            <div id=\"WAF_NC_H5_WRAPPER\" class=\"waf-nc-h5-wrapper\">\n",
      "                <div class=\"waf-nc-h5-panel\">\n",
      "                    <img class=\"waf-nc-h5-icon\" src=\"//img.alicdn.com/imgextra/i1/O1CN01L12MaQ1ZwfYKk7Yrc_!!6000000003259-2-tps-900-594.png\" alt=\"\" height=\"132\" width=\"200\">\n",
      "                    <div class=\"waf-nc-h5-description\">ä¸ºäºæ´å¥½çè®¿é®ä½éªï¼è¯·æ»å¨æ»åè¿è¡éªè¯</div>\n",
      "                </div>\n",
      "                <div id=\"h5_nocaptcha\" class=\"nc-container\" data-nc-idx=\"1\"></div>\n",
      "            </div>\n",
      "        </div>\n",
      "        <div style=\"margin-left:20px\" id=\"traceid\">TraceID: ac11000116876223692403248e00d5</div>\n",
      "    </div>\n",
      "    </body>\n",
      "    <script type=\"text/javascript\">\n",
      "\n",
      "        var requestInfo = {\n",
      "        type: 'GET', // 'GET' å 'POST'\n",
      "        url: 'http://we.51job.com/api/job/search-pc?api_key=51job&timestamp=1687622267&keyword=%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86&function=&searchType=2&industry=&jobArea=030200&jobArea2=&landmark=&metro=&salary=&workYear=&degree=&companyType=&companySize=&jobType=&issueDate=&sortType=0&pageNum=8&requestId=&pageSize=20&source=1&accountId=158566507&pageCode=+sou%7Csou%7Csoulb', // 'https://www.taobao.com/detail'\n",
      "        args: 'api_key=51job&timestamp=1687622267&keyword=%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86&function=&searchType=2&industry=&jobArea=030200&jobArea2=&landmark=&metro=&salary=&workYear=&degree=&companyType=&companySize=&jobType=&issueDate=&sortType=0&pageNum=8&requestId=&pageSize=20&source=1&accountId=158566507&pageCode=+sou%7Csou%7Csoulb',\n",
      "        data: '', //a=1&b=2&c=3...\n",
      "        token: '3467e806-f304-4956-a21e-1b38da081f5d',\n",
      "        refer: '8pMIuF+2fEeTVAhE+z4vfF1sPmQ=',\n",
      "        headers: {},\n",
      "};\n",
      "\n",
      "\n",
      "function insertScripts(){\n",
      "    var script = document.createElement('script');\n",
      "    var time = new Date();\n",
      "    var head = document.head || document.getElementsByTagName('head')[0];\n",
      "    script.src = '//g.alicdn.com/AWSC/AWSC/awsc.js?t=' + (time.getFullYear()+(time.getMonth()+1)+time.getDate()+time.getHours());\n",
      "    if (\"onload\" in script) {\n",
      "        script.onload = function(){\n",
      "            initNC();\n",
      "        }\n",
      "    } else {\n",
      "        script.onreadystatechange = function() {\n",
      "            if (/loaded|complete/.test(script.readyState)) {\n",
      "                initNC();\n",
      "            }\n",
      "        };\n",
      "    }\n",
      "    head.appendChild(script);\n",
      "    //å è½½åèªçcss\n",
      "    var style = document.createElement('style');\n",
      "    style.type = \"text/css\";\n",
      "    var css = '';\n",
      "    if (_waf_is_mobile){\n",
      "        css = '#waf_nc_h5_block{position:fixed;_position:absolute;width:100%;height:100%;top:0;bottom:0;left:0;z-index:9999}.waf-nc-h5-mask{background:#777;opacity:.5;filter:alpha(opacity=50);width:100%;height:100%}.waf-nc-h5-wrapper{width:94%;position:absolute;top:20%;left:50%;margin-top:-20%;margin-left:-47%;padding:5% 1%;background:#fff;border-radius:3px;box-sizing:border-box}.waf-nc-h5-panel{width:100%;text-align:center}.waf-nc-h5-icon{margin:0 auto}.waf-nc-h5-description{margin-top:40px;font-size:14px;color:#595959}#traceid{text-align:center;margin-top:500px!important;font-size:12px;color:#999}.nc-container{margin-top:30px}.nc_bg{background:#fff3ea!important}.btn_slide{background:#ff6a00!important;border:0!important;color:#fff!important;width:48px!important;height:48px!important;font-size:30px;font-weight:900!important;line-height:48px!important}.btn_ok{background:#ff6a00!important;border:0!important;color:#fff!important;width:48px!important;height:48px!important;font-size:30px;font-weight:900!important;line-height:48px!important}.nc_scale{background:rgba(241,241,242,1)!important;height:48px!important}.nc-lang-cnt{height:48px!important;margin-left:10px!important;line-height:48px!important;font-size:14px!important}.nc_1_nocaptcha{width:300px!important;height:48px!important;margin:auto!important;left:0!important;right:0!important}'\n",
      "    }else{\n",
      "        css = '.head{position:relative;height:70px;padding-left:25px;border-bottom:1px solid #ebecec}.content{width:1000px;min-height:250px;margin-top:164px!important;margin-left:auto;margin-right:auto}.left{width:300px;height:198px;float:left;background:url(https://img.alicdn.com/imgextra/i1/O1CN01L12MaQ1ZwfYKk7Yrc_!!6000000003259-2-tps-900-594.png) no-repeat;background-size:cover}.right{margin-left:250px;padding-left:140px}.contentbg{width:100%;min-height:250px}.right p{font-size:14px;color:#333;line-height:25px;height:25px;text-align:left}#nocaptcha{margin-top:40px;margin-left:5px;width:300px!important}#nocaptcha .nc-lang-cnt{color:#fff}#nocaptcha .clickCaptcha_text .nc-lang-cnt{color:#333}#traceid{margin-left:250px!important;padding-left:140px!important;font-size:14px;color:rgba(153,153,153,1)}.nc_bg{background:#fff3ea!important}.btn_slide{background:#ff6a00!important;border:0!important;color:#fff!important;width:48px!important;height:48px!important;font-size:30px;font-weight:900!important;line-height:48px!important}.btn_ok{background:#ff6a00!important;border:0!important;color:#fff!important;width:48px!important;height:48px!important;font-size:30px;font-weight:900!important;line-height:48px!important}.nc_scale{background:rgba(241,241,242,1)!important;height:48px!important}.nc-lang-cnt{height:48px!important;margin-left:10px!important;line-height:48px!important;font-size:14px!important}.nc_1_nocaptcha{width:300px!important;height:48px!important}'\n",
      "    }\n",
      "    try {\n",
      "        style.appendChild(document.createTextNode(css));\n",
      "    }catch(e){\n",
      "        style.styleSheet.cssText = css;\n",
      "    }\n",
      "    var head = document.head || document.getElementsByTagName('head')[0];\n",
      "    head.appendChild(style);\n",
      "}\n",
      "\n",
      "insertScripts();\n",
      "\n",
      "function parseURL(url) {\n",
      "\n",
      "    var search_index = url.indexOf('?'),\n",
      "        hash_index = url.indexOf('#');\n",
      "\n",
      "    var base, search, hash;\n",
      "\n",
      "    try{\n",
      "        if (search_index < 0 || (hash_index > -1 && search_index > hash_index)){\n",
      "            if (hash_index < 0){\n",
      "                base = url;\n",
      "                search = '';\n",
      "                hash = '';\n",
      "            }else{\n",
      "                base = url.slice(0, hash_index);\n",
      "                search = '';\n",
      "                hash = url.slice(hash_index, url.length);\n",
      "            }\n",
      "\n",
      "        }else{\n",
      "            if (hash_index < 0){\n",
      "                base = url.slice(0, search_index);\n",
      "                search = url.slice(search_index, url.length);\n",
      "                hash = '';\n",
      "            }else{\n",
      "                base = url.slice(0, search_index);\n",
      "                search = url.slice(search_index, hash_index);\n",
      "                hash = url.slice(hash_index, url.length);\n",
      "            }\n",
      "        }\n",
      "    }catch(e){\n",
      "        base = url;\n",
      "        search = '';\n",
      "        hash = '';\n",
      "    }\n",
      "\n",
      "\n",
      "    return {\n",
      "        base: base,\n",
      "        search: search,\n",
      "        hash: hash,\n",
      "        original: url\n",
      "    }\n",
      "\n",
      "}\n",
      "\n",
      "function parseQuery(qstr) {\n",
      "    if (qstr.charAt(0) != '?') {\n",
      "        return {};\n",
      "    }\n",
      "    var query = {};\n",
      "    var a = qstr.substr(1).split('&');\n",
      "    for (var i = 0; i < a.length; i++) {\n",
      "        var b = a[i].split('=');\n",
      "        console.log(decodeURIComponent(b[0]))\n",
      "        if (decodeURIComponent(b[0]) !== 'u_asec'){\n",
      "            query[decodeURIComponent(b[0])] = decodeURIComponent(b[1] || '');\n",
      "        }\n",
      "\n",
      "    }\n",
      "    return query;\n",
      "}\n",
      "\n",
      "function addQuery(query, data) {\n",
      "    var qdata = parseQuery(query);\n",
      "    var rt = '?';\n",
      "    for (var i in data) {\n",
      "        qdata[i] = data[i];\n",
      "    }\n",
      "    for (var i in qdata) {\n",
      "        rt += encodeURIComponent(i) + '=' + encodeURIComponent(qdata[i]) + '&';\n",
      "    }\n",
      "    rt = rt.substr(0 , rt.length - 1);\n",
      "    return rt;\n",
      "}\n",
      "\n",
      "function combineUrl(parsedUrl) {\n",
      "    return parsedUrl.base + parsedUrl.search + parsedUrl.hash;\n",
      "\n",
      "}\n",
      "\n",
      "function parseFormQuery(qstr) {\n",
      "    if (qstr.length === 0 || qstr.indexOf('=') < 0){\n",
      "        return [];\n",
      "    }\n",
      "\n",
      "    var formItems = [];\n",
      "    var a = qstr.split('&');\n",
      "    for (var i = 0; i < a.length; i++) {\n",
      "        var b = a[i].split('=');\n",
      "        var str = '<input type=\"hidden\" name=\"' + b[0] + '\" value=\"' + b[1] + '\" />'\n",
      "        formItems.push(str);\n",
      "    }\n",
      "    return formItems;\n",
      "}\n",
      "\n",
      "function reform(data) {\n",
      "    var form = document.createElement('form');\n",
      "    var parsedUrl = parseURL(requestInfo.url);\n",
      "    parsedUrl.search = addQuery(parsedUrl.search,data)\n",
      "    var newUrl = combineUrl(parsedUrl);\n",
      "    form.action = newUrl;\n",
      "    form.method = \"POST\";\n",
      "    form.innerHTML = parseFormQuery(requestInfo.data).join('');\n",
      "    document.body.appendChild(form);\n",
      "    form.submit();\n",
      "    // document.body.appendChild(form);\n",
      "}\n",
      "\n",
      "var NC_Opt = {\n",
      "    renderTo: \"nocaptcha\",//æ¸²æå°DOM ID\n",
      "    appkey: \"CF_APP_WAF\", // åºç¨æ è¯\n",
      "    scene: \"register\",\n",
      "    trans: {\"key1\": \"code100\", \"user\": \"default\"},\n",
      "    token: requestInfo.token,//umid token\n",
      "    language: \"cn\",//è¯­è¨å",
      "ï¼é»è®¤ä¸­æ\n",
      "    isEnabled: true,\n",
      "    times: 3,\n",
      "    success: function (data) {\n",
      "        document.getElementById(\"nc_1_n1z\").innerHTML='â'\n",
      "        document.getElementsByClassName('nc-lang-cnt')[0].innerHTML='<b style=\"margin-left:60px;-webkit-text-fill-color:#FF6A00 !important\">éªè¯æåï¼</b>'\n",
      "\n",
      "        if (requestInfo.type === 'GET'){\n",
      "            var d = {\n",
      "                u_atoken: data.token,\n",
      "                u_asession: data.sessionId,\n",
      "                u_asig: data.sig,\n",
      "                u_aref: requestInfo.refer\n",
      "            };\n",
      "            // location.href = requestInfo.url + addQuery(requestInfo.data, d);\n",
      "            var parsedUrl = parseURL(requestInfo.url);\n",
      "            parsedUrl.search = addQuery(parsedUrl.search,d)\n",
      "            // location.href = combineUrl(parsedUrl);\n",
      "            location.replace(combineUrl(parsedUrl));\n",
      "        }else{\n",
      "            var d = {\n",
      "                u_atoken: data.token,\n",
      "                u_asession: data.sessionId,\n",
      "                u_asig: data.sig,\n",
      "                u_aref: requestInfo.refer\n",
      "            };\n",
      "            reform(d);\n",
      "        }\n",
      "    },\n",
      "    // æ»å¨éªè¯å¤±è´¥æ¶è§¦åè¯¥åè°åæ°ã\n",
      "    fail: function (failCode) {\n",
      "        window.console && console.log(s);\n",
      "    },\n",
      "    // éªè¯ç å è½½åºç°å¼å¸¸æ¶è§¦åè¯¥åè°åæ°ã\n",
      "    error: function (errorCode) {\n",
      "         window.console && console.log(errorCode)\n",
      "    }\n",
      "};\n",
      "var NC_h5_Opt = {\n",
      "    renderTo: \"h5_nocaptcha\",//æ¸²æå°DOM ID\n",
      "    appkey: \"CF_APP_WAF\", // åºç¨æ è¯\n",
      "    scene: \"register_h5\",\n",
      "    trans: {\"key1\": \"code200\", \"user\": \"default\"},\n",
      "    token: requestInfo.token,//umid token\n",
      "    language: \"cn\",//è¯­è¨å",
      "ï¼é»è®¤ä¸­æ\n",
      "    isEnabled: true,\n",
      "    times: 3,\n",
      "    success: function (data) {\n",
      "        document.getElementById(\"nc_1_n1z\").innerHTML='â'\n",
      "        document.getElementsByClassName('nc-lang-cnt')[0].innerHTML='<b style=\"margin-left:60px;-webkit-text-fill-color:#FF6A00 !important\">éªè¯æåï¼</b>'\n",
      "        if (data.token === undefined) data.token = requestInfo.token;\n",
      "        if (requestInfo.type === 'GET'){\n",
      "            var d = {\n",
      "                u_atoken: data.token,\n",
      "                u_asession: data.sessionId,\n",
      "                u_asig: data.sig,\n",
      "                u_aref: requestInfo.refer\n",
      "            };\n",
      "            // location.href = requestInfo.url + addQuery(requestInfo.data, d);\n",
      "            var parsedUrl = parseURL(requestInfo.url);\n",
      "            parsedUrl.search = addQuery(parsedUrl.search,d)\n",
      "            // location.href = combineUrl(parsedUrl);\n",
      "            location.replace(combineUrl(parsedUrl));\n",
      "        }else{\n",
      "            var d = {\n",
      "                u_atoken: data.token,\n",
      "                u_asession: data.sessionId,\n",
      "                u_asig: data.sig,\n",
      "                u_aref: requestInfo.refer\n",
      "            };\n",
      "            reform(d);\n",
      "        }\n",
      "    },\n",
      "    // æ»å¨éªè¯å¤±è´¥æ¶è§¦åè¯¥åè°åæ°ã\n",
      "    fail: function (failCode) {\n",
      "        window.console && console.log(s);\n",
      "    },\n",
      "    // éªè¯ç å è½½åºç°å¼å¸¸æ¶è§¦åè¯¥åè°åæ°ã\n",
      "    error: function (errorCode) {\n",
      "         window.console && console.log(errorCode)\n",
      "    }\n",
      "};\n",
      "\n",
      "function initNC() {\n",
      "    if (window._waf_is_mobile){\n",
      "        document.getElementById('H5').style.display = 'block';\n",
      "        // NoCaptcha.init(NC_h5_Opt);\n",
      "        // NoCaptcha.setEnabled(true);\n",
      "        AWSC.use(\"nc\", function (state, module) {\n",
      "            window.nc = module.init(NC_h5_Opt);\n",
      "        })\n",
      "    }else{\n",
      "        document.getElementById('PC').style.display = 'block';\n",
      "        // var nc = new noCaptcha(NC_Opt);\n",
      "        AWSC.use(\"nc\", function (state, module) {\n",
      "            window.nc = module.init(NC_Opt);\n",
      "        })\n",
      "    }\n",
      "}\n",
      "</script>\n",
      "</html>\n",
      "\n",
      ": 4\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "127.0.0.1 - - [24/Jun/2023 23:59:29] \"GET / HTTP/1.1\" 500 -\n"
     ]
    }
   ],
   "source": [
    "import wy\n",
    "import requests\n",
    "from flask import Flask\n",
    "from jinja2 import Markup, Environment, FileSystemLoader\n",
    "from pyecharts.globals import CurrentConfig\n",
    "\n",
    "# 关于 CurrentConfig，可参考 [基本使用-全局变量]\n",
    "CurrentConfig.GLOBAL_ENV = Environment(loader=FileSystemLoader(\"./templates\"))\n",
    "\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Bar\n",
    "\n",
    "area = input('请输入城市：')\n",
    "keys = input('请输入岗位：')\n",
    "\n",
    "\n",
    "app = Flask(__name__, static_folder=\"templates\")\n",
    "\n",
    "@app.route(\"/\")\n",
    "def index():\n",
    "    wy.wy_data(area,keys)\n",
    "    c = wy.wy_dq(area,keys)\n",
    "    return Markup(c.render_embed())\n",
    "\n",
    "\n",
    "if __name__ == \"__main__\":\n",
    "    app.run()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c66ce283",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a7870fbb",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.0b3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
